# coding:utf-8
# writingtime: 2022-8-11

import numpy as np
import random as rm
from math import log10


class GetTestData:
    def __init__(self, deviationsize=None):
        """
        function：生成得分函数的测试数据
        :param deviationsize: 偏移量
        """
        if deviationsize is None:
            self.deviation = 0.1
        else:
            self.deviation = deviationsize

    def auxiliaryfunction(self, length):
        """
        function: 辅助函数，根据线段长度生成所有可能
        :param length: 线段长度
        :return:
        """
        numb_round = int(log10(1 / self.deviation))
        list_temp = []
        temp = np.array([0, length])
        while temp[1] < 1:
            list_temp.append([round(temp[0], numb_round), round(temp[1], numb_round)])
            temp += self.deviation
        return list_temp

    def getlinerandom(self, L1):
        """
        生成一个区间，区间的长度为：L1
        随机构造一个线段 |_________|
        :param L1:
        :return:
        """
        numb_round = int(log10(1 / self.deviation))
        add = round(rm.random(), numb_round)
        sub = round(add - L1, numb_round)
        while sub < 0:
            add = round(rm.random(), numb_round)
            sub = round(add - L1, numb_round)
        line = [sub, add]
        return line

    def getrondomivq_rof(self, L1, L2):
        """
        任意区间值广义正交模糊数,生成了两个区间，[x1,x2,y1,y2] 每个区间的长度都为l1，l2
        :param L1:U部分长度
        :param L2:V部分长度
        :return:
        """
        u = self.getlinerandom(L1)
        v = self.getlinerandom(L2)
        ivqrof = [u, v]

        return ivqrof

    def case1(self):
        """
        function: L1=L2=L3=L4=0,x1=x2=y1=y2,数据同时移动
        :return:测试数据集
        """
        temp = np.arange(0, 1, self.deviation)
        # 精度
        numb_round = int(log10(1 / self.deviation))
        list_temp = [([round(i, numb_round), round(i, numb_round)], [round(i, numb_round), round(i, numb_round)]) for i
                     in temp]
        return list_temp

    def case2(self):
        """
        function:L1=L2=L3=L4=0,x1≠x2,y1≠y2
        :return:
        """
        temp = np.arange(0, 1, self.deviation)
        # 精度
        numb_round = int(log10(1 / self.deviation))
        list_temp = []
        for i in temp:
            for j in temp:
                list_temp.append(
                    ([round(i, numb_round), round(i, numb_round)], [round(j, numb_round), round(j, numb_round)]))
        return list_temp

    def case3(self):
        """
        function； L1=L2=L3=L4≠0,x1=x2,y1=y2
        :return:
        """
        # 精度
        numb_round = int(log10(1 / self.deviation))
        # 随机生成L1,L2,L3,L4的值，控制0.1<=L1<=0.2，避免生成数据过小
        l1 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        list_temp = []
        temp = np.array([0, l1])
        # 将所有的可能结果生成
        while temp[1] < 1:
            list_temp.append(list(temp))
            temp += self.deviation
        # 获得所有种组合
        lis = [(i, i) for i in list_temp]
        return lis

    def case4(self):
        """
        function: L1=L2=L3=L4≠0,x1≠x2,y1≠y2
        :return:
        """
        # 精度
        numb_round = int(log10(1 / self.deviation))
        # 随机生成L1,L2,L3,L4的值，控制0.1<=L1<=0.2，避免生成数据过小
        l1 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        list_temp = []
        temp = np.array([0, l1])
        # 将所有的可能结果生成
        while temp[1] < 1:
            list_temp.append(list(temp))
            temp += self.deviation
        # 获得所有结果
        lis = []
        for i in list_temp:
            for j in list_temp:
                lis.append((i, j))
        for i in lis:
            print(i)

    def case5(self):
        """
        function: L1=L3≠0,L2=L4≠0
        :return:
        """
        # 精度
        numb_round = int(log10(1 / self.deviation))
        # 随机生成L1,L2,L3,L4的值，控制0.1<=L1<=0.2，避免生成数据过小
        rm.seed(100)
        l1 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        l2 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        # 基点
        point_temp = np.array(self.getrondomivq_rof(l1, l2))
        temp1 = self.auxiliaryfunction(l1)
        temp2 = self.auxiliaryfunction(l2)
        lis = []
        for i in temp1:
            for j in temp2:
                lis.append([(list(point_temp[0]), list(point_temp[1])), (i, j)])
        # for i in lis:
        #     print(i)
        return lis

    def case6(self):
        """
        function：L1≠L3,L1≠L3
        :return:
        """
        # 精度
        numb_round = int(log10(1 / self.deviation))
        # 随机生成L1,L2,L3,L4的值，控制0.1<=L1<=0.2，避免生成数据过小
        rm.seed(200)
        l1 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        l2 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        l3 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        while l1 == l3:
            l3 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        contract_point = self.getrondomivq_rof(l1, l2)
        temp1 = self.auxiliaryfunction(l3)
        temp2 = self.auxiliaryfunction(l2)
        lis = []
        for i in temp1:
            for j in temp2:
                lis.append([(list(contract_point[0]), list(contract_point[1])), (i, j)])
        # for i in lis:
        #     print(i)
        return lis

    def case7(self):
        """
        function: 与case7相似，将u,v调换位置
        :return:
        """
        matrix = self.case6()
        lis = [[(i[1], i[0]) for i in j] for j in matrix]
        # for i in lis:
        #     print(i)
        return lis

    def case8(self):
        """
        function: L1=L3,L2>L4
        :return:
        """
        # 精度
        numb_round = int(log10(1 / self.deviation))
        # 随机生成L1,L2,L3,L4的值，控制0.1<=L1<=0.2，避免生成数据过小
        rm.seed(300)
        l1 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        l2 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        l3 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        while l1 <= l3:
            l3 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        contract_point = self.getrondomivq_rof(l1, l2)
        temp1 = self.auxiliaryfunction(l3)
        temp2 = self.auxiliaryfunction(l2)
        lis = []
        for i in temp1:
            for j in temp2:
                lis.append([(list(contract_point[0]), list(contract_point[1])), (i, j)])
        # for i in lis:
        #     print(i)
        return lis

    def case9(self):
        """
        function: 与case8相似，将u,v调换位置
        :return:
        """
        matrix = self.case8()
        lis = [[(i[1], i[0]) for i in j] for j in matrix]
        # for i in lis:
        #     print(i)
        return lis

    def case10(self):
        """
        function: L1>L3,L2>L4
        :return:
        """
        # 精度
        numb_round = int(log10(1 / self.deviation))
        # 随机生成L1,L2,L3,L4的值，控制0.1<=L1<=0.2，避免生成数据过小
        rm.seed(300)
        l1 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        l2 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        l3 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        l4 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        while l1 <= l3:
            l3 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round
        while l2 <= l4:
            l4 = rm.randint(10 ** (numb_round - 1), (10 ** numb_round) / 5) / 10 ** numb_round

        contract_point = self.getrondomivq_rof(l1, l2)
        temp1 = self.auxiliaryfunction(l3)
        temp2 = self.auxiliaryfunction(l2)
        lis = []
        for i in temp1:
            for j in temp2:
                lis.append([(list(contract_point[0]), list(contract_point[1])), (i, j)])
        # for i in lis:
        #     print(i)
        return lis

    def case11(self):
        """
        function: 论文中的手机的数据
        :return:
        """
        data = [
            [([0.30, 0.50], [0.20, 0.40]), ([0.35, 0.45], [0.25, 0.35])],
            [([0.20, 0.20], [0.30, 0.30]), ([0.25, 0.25], [0.35, 0.35])],
            [([0.50, 0.60], [0.30, 0.40]), ([0.25, 0.25], [0.35, 0.35])],
            [([0.35, 0.45], [0.20, 0.30]), ([0.30, 0.50], [0.15, 0.35])],
            [([0.30, 0.30], [0.30, 0.30]), ([0.40, 0.40], [0.40, 0.40])],
            [([0.00, 0.00], [0.10, 0.10]), ([0.00, 0.00], [0.90, 0.90])],
            [([0.00, 0.00], [0.20, 0.20]), ([0.00, 0.00], [0.30, 0.30])],
            [([0.30, 0.50], [0.30, 0.50]), ([0.40, 0.50], [0.40, 0.50])],
            [([0.10, 0.10], [0.10, 0.10]), ([0.40, 0.50], [0.40, 0.50])],
            [([0.30, 0.40], [0.20, 0.40]), ([0.35, 0.35], [0.25, 0.35])],
            [([0.50, 0.50], [0.50, 0.50]), ([0.30, 0.50], [0.30, 0.50])],
            [([0.15, 0.50], [0.03, 0.50]), ([0.18, 0.50], [0.06, 0.50])],
            [([0.20, 0.20], [0.20, 0.20]), ([0.30, 0.30], [0.10, 0.10])],
            [([0.10, 0.40], [0.20, 0.50]), ([0.20, 0.30], [0.30, 0.40])],
            [([0.20, 0.40], [0.30, 0.40]), ([0.10, 0.50], [0.20, 0.50])],
            [([0.30, 0.60], [0.20, 0.30]), ([0.40, 0.50], [0.10, 0.40])],
            [([0.20, 0.60], [0.20, 0.40]), ([0.30, 0.50], [0.10, 0.50])],  # Rıdvan ¸Sahin 2015
            [([0.40, 0.40], [0.60, 0.60]), ([0.30, 0.30], [0.50, 0.50])],
            [([0.40, 0.40], [0.40, 0.40]), ([0.50, 0.50], [0.50, 0.50])],
            [([0.00, 0.00], [0.00, 0.00]), ([0.00, 0.00], [0.50, 0.50])],
            [([1.00, 1.00], [0.00, 0.00]), ([0.00, 0.00], [1.00, 1.00])],
            [([1.00, 1.00], [0.00, 0.00]), ([0.00, 0.00], [0.50, 0.50])],  # Hoang Nguyen
            [([0.3, 0.5], [0.2, 0.4]), ([0.35, 0.45], [0.25, 0.35])],
            [([0.3, 0.5], [0.3, 0.5]), ([0.4, 0.5], [0.4, 0.5])],
            [([0.15, 0.5], [0.03, 0.5]), ([0.18, 0.5], [0.06, 0.5])],
            [([0.15, 0.5], [0.03, 0.5]), ([0.18, 0.5], [0.06, 0.5])],
            [([0.3, 0.5], [0.3, 0.5]), ([0.4, 0.5], [0.4, 0.5])],
            [([0.0, 0.0], [0.1, 0.1]), ([0.0, 0.0], [0.9, 0.9])],
            [([0.2, 0.2], [0.55, 0.55]), ([0.05, 0.05], [0.2, 0.2])],
            [([0.6, 0.7], [0.3, 0.35]), ([0.6, 0.7], [0.3, 0.35])],
            [([1 / 6, 1 / 2], [0, 1 / 12])], [([1 / 4, 5 / 12], [0, 1 / 6])],
            [([0.0, 0.0], [0.2, 0.2]), ([0.0, 0.0], [0.3, 0.3])],
            [([0.3, 0.3], [0.3, 0.3]), ([0.4, 0.4], [0.4, 0.4])],
            [([0.0, 0.0], [0.1, 0.1]), ([0.0, 0.0], [0.9, 0.9])],
            [([0.0, 0.0], [0.2, 0.2]), ([0.0, 0.0], [0.3, 0.3])],
            [([0.3, 0.5], [0.2, 0.4]), ([0.35, 0.45], [0.25, 0.35])],
            [([0.35, 0.45], [0.2, 0.3]), ([0.3, 0.5], [0.15, 0.35])],
            [([0.0, 0.0], [0.1, 0.1]), ([0.0, 0.0], [0.9, 0.9])],
            [([0.0, 0.0], [0.2, 0.2]), ([0.0, 0.0], [0.3, 0.3])],
            [([0.0, 0.0], [0.1, 0.1]), ([0.0, 0.0], [0.9, 0.9])],
            [([0.0, 0.0], [0.2, 0.2]), ([0.0, 0.0], [0.3, 0.3])],
            [([0.2, 0.2], [0.3, 0.3]), ([0.25, 0.25], [0.35, 0.35])],
            [([0.6, 0.7], [0.3, 0.35]), ([0.5, 0.55], [0.15, 0.25])],
            [([0.05, 0.05], [0.1, 0.1]), ([0.75, 0.75], [0.5, 0.5])],
            [([0.05, 0.05], [0.1, 0.1]), ([0.85, 0.85], [0.7, 0.7])],
            [([0.3, 0.5], [0.2, 0.4]), ([0.35, 0.45], [0.25, 0.35])],
            [([0.35, 0.45], [0.2, 0.3]), ([0.3, 0.5], [0.15, 0.35])],
            [([0.3, 0.3], [0.3, 0.3]), ([0.4, 0.4], [0.4, 0.4])],
            [([0.3, 0.6], [0.2, 0.3]), ([0.4, 0.5], [0.1, 0.4])],
            [([0.15, 0.5], [0.03, 0.5]), ([0.18, 0.5], [0.06, 0.5])],
            [([0.3, 0.5], [0.3, 0.5]), ([0.4, 0.5], [0.4, 0.5])],
            [([0.3, 0.3], [0.3, 0.3]), ([0.4, 0.4], [0.4, 0.4])],
            [([0.3, 0.5], [0.3, 0.5]), ([0.4, 0.5], [0.4, 0.5])],
            [([0.35, 0.45], [0.2, 0.3]), ([0.3, 0.5], [0.15, 0.35])],
            [([0.15, 0.5], [0.03, 0.5]), ([0.18, 0.5], [0.06, 0.5])],
            [([0.85, 0.85], [1.0, 1.0]), ([0.75, 0.75], [1.0, 1.0])],
            [([0.65, 0.65], [1.0, 1.0]), ([0.95, 0.95], [1.0, 1.0])],
            [([0.35, 0.45], [0.2, 0.3]), ([0.3, 0.5], [0.15, 0.35])],
            [([0.1, 0.4], [0.2, 0.5]), ([0.2, 0.3], [0.3, 0.4])],
            [([0.6, 0.7], [0.3, 0.35]), ([0.5, 0.6], [0.2, 0.25])],
            [([0.6, 0.7], [0.3, 0.35]), ([0.6, 0.7], [0.3, 0.35])],
            [([0.2, 0.2], [0.3, 0.3]), ([0.25, 0.25], [0.35, 0.35])],
            [([0.15, 0.5], [0.03, 0.5]), ([0.18, 0.5], [0.06, 0.5])],
            [([0.9, 0.9], [0.0, 0.0]), ([0.85, 0.85], [0.15, 0.15])],
            [([0.75, 0.75], [0.2, 0.2]), ([0.8, 0.8], [0.05, 0.05])],
            [([0.4, 0.6], [0.3, 0.7]), ([0.3, 0.7], [0.4, 0.6])],
            [([0.4, 0.4], [0.4, 0.4]), ([0.5, 0.5], [0.5, 0.5])],
            [([0.2, 0.4], [0.3, 0.4]), ([0.1, 0.5], [0.2, 0.5])],
            [([0.6, 0.7], [0.3, 0.35]), ([0.6, 0.7], [0.3, 0.35])],
            [([0.3, 0.5], [0.2, 0.4]), ([0.35, 0.45], [0.25, 0.35])],
            [([0.35, 0.45], [0.2, 0.3]), ([0.3, 0.5], [0.15, 0.35])],
            [([0.3, 0.3], [0.9, 0.9]), ([0.05, 0.05], [0.4, 0.4])],
            [([0.3, 0.5], [0.2, 0.4]), ([0.35, 0.45], [0.25, 0.35])],
            [([0.2, 0.6], [0.2, 0.4]), ([0.3, 0.5], [0.1, 0.5])],
            [([0.1, 0.4], [0.2, 0.5]), ([0.2, 0.3], [0.3, 0.4])],
            [([0.0, 0.0], [0.0, 0.0]), ([0.0, 0.0], [0.5, 0.5])],
            [([0.3, 0.4], [0.2, 0.4]), ([0.35, 0.35], [0.25, 0.35])],
            [([0.35, 0.45], [0.2, 0.3]), ([0.3, 0.5], [0.15, 0.35])],
            [([0.6, 0.7], [0.3, 0.35]), ([0.05, 0.15], [0.15, 0.25])],
            [([0.6, 0.7], [0.3, 0.35]), ([0.1, 0.15], [0.2, 0.3])],
            [([0.3, 0.5], [0.2, 0.4]), ([0.35, 0.45], [0.25, 0.35])],
            [([0.3, 0.4], [0.2, 0.4]), ([0.35, 0.35], [0.25, 0.35])],
            [([0.2, 0.4], [0.3, 0.4]), ([0.1, 0.5], [0.2, 0.5])],
            [([0.3, 0.6], [0.2, 0.3]), ([0.4, 0.5], [0.1, 0.4])],
            [([0.1, 0.4], [0.2, 0.5]), ([0.2, 0.3], [0.3, 0.4])],
            [([0.2, 0.4], [0.3, 0.4]), ([0.1, 0.5], [0.2, 0.5])],
            [([0.2, 0.6], [0.2, 0.4]), ([0.3, 0.5], [0.1, 0.5])],
            [([0.4, 0.4], [0.4, 0.4]), ([0.5, 0.5], [0.5, 0.5])],
            [([0.3, 0.5], [0.2, 0.4]), ([0.35, 0.45], [0.25, 0.35])],
            [([0.2, 0.2], [0.3, 0.3]), ([0.25, 0.25], [0.35, 0.35])],
            [([0.6, 0.7], [0.3, 0.35]), ([0.35, 0.4], [0.25, 0.35])],
            [([0.2, 0.4], [0.3, 0.4]), ([0.1, 0.5], [0.2, 0.5])],
            [([0.4, 0.4], [0.6, 0.6]), ([0.3, 0.3], [0.5, 0.5])],
            [([0.3, 0.6], [0.2, 0.3]), ([0.4, 0.5], [0.1, 0.4])],
            [([0.8, 0.8], [0.1, 0.1]), ([0.1, 0.1], [0.8, 0.8])],
            [([0.55, 0.55], [0.05, 0.05]), ([0.2, 0.2], [0.45, 0.45])],
            [([0.65, 0.65], [0.7, 0.7]), ([0.5, 0.5], [0.85, 0.85])],
            [([0.5, 0.5], [0.25, 0.25]), ([0.1, 0.1], [0.65, 0.65])],
            [([0.2, 0.4], [0.3, 0.4]), ([0.1, 0.5], [0.2, 0.5])],
            [([0.3, 0.4], [0.2, 0.4]), ([0.35, 0.35], [0.25, 0.35])],
            [([0.3, 0.5], [0.3, 0.5]), ([0.4, 0.5], [0.4, 0.5])],
            [([0.1, 0.1], [0.1, 0.1]), ([0.4, 0.5], [0.4, 0.5])],
            [([0.3, 0.4], [0.2, 0.4]), ([0.35, 0.35], [0.25, 0.35])],
            [([0.1, 0.4], [0.2, 0.5]), ([0.2, 0.3], [0.3, 0.4])],
            [([0.2, 0.4], [0.3, 0.4]), ([0.1, 0.5], [0.2, 0.5])],
            [([0.0, 0.0], [0.1, 0.1]), ([0.0, 0.0], [0.9, 0.9])],
            [([0.0, 0.0], [0.2, 0.2]), ([0.0, 0.0], [0.3, 0.3])],
            [([0.0, 0.0], [0.0, 0.0]), ([0.0, 0.0], [0.5, 0.5])],
            [([0.3, 0.5], [0.2, 0.4]), ([0.35, 0.45], [0.25, 0.35])],
            [([0.2, 0.2], [0.3, 0.3]), ([0.25, 0.25], [0.35, 0.35])],
            [([0.35, 0.45], [0.2, 0.3]), ([0.3, 0.5], [0.15, 0.35])],
            [([0.4413, 0.9313], [0.0919, 0.9219]), ([0.1592, 0.6492], [0.0463, 0.8763])],
            [([0.1894, 0.6794], [0.03, 0.86]), ([0.4972, 0.9872], [0.0853, 0.9153])],
            [([0.4446, 0.9346], [0.0346, 0.8646]), ([0.0267, 0.5167], [0.0358, 0.8658])],
            [([0.2, 0.2], [0.2, 0.2]), ([0.3, 0.3], [0.1, 0.1])],
            [([0.3, 0.6], [0.2, 0.3]), ([0.4, 0.5], [0.1, 0.4])],
            [([0.2, 0.6], [0.2, 0.4]), ([0.3, 0.5], [0.1, 0.5])],
            [([0.0191, 0.8891], [0.1931, 0.6131]), ([0.0454, 0.9154], [0.2999, 0.7199])],
            [([0.0519, 0.9219], [0.0647, 0.4847]), ([0.0599, 0.9299], [0.5557, 0.9757])],
            [([0.0545, 0.9245], [0.3568, 0.7768]), ([0.0303, 0.9003], [0.2583, 0.6783])],
            [([0.0585, 0.9785], [0.416, 0.726]), ([0.0058, 0.9258], [0.2083, 0.5183])],
            [([0.0491, 0.9691], [0.3337, 0.6437]), ([0.0015, 0.9215], [0.4109, 0.7209])],
            [([0.0291, 0.9491], [0.3312, 0.6412]), ([0.0534, 0.9734], [0.4281, 0.7381])],
            [([0.0, 0.0], [0.1, 0.1]), ([0.0, 0.0], [0.9, 0.9])],
            [([1.0, 1.0], [0.0, 0.0]), ([0.0, 0.0], [1.0, 1.0])],
            [([0.3, 0.5], [0.2, 0.4]), ([0.35, 0.45], [0.25, 0.35])],
            [([0.35, 0.45], [0.2, 0.3]), ([0.3, 0.5], [0.15, 0.35])],
            [([0.3, 0.3], [0.3, 0.3]), ([0.4, 0.4], [0.4, 0.4])],
            [([0.3, 0.5], [0.3, 0.5]), ([0.4, 0.5], [0.4, 0.5])],
            [([0.1, 0.1], [0.1, 0.1]), ([0.4, 0.5], [0.4, 0.5])],
            [([0.3, 0.4], [0.2, 0.4]), ([0.35, 0.35], [0.25, 0.35])],
            [([0.0036, 0.9136], [0.0299, 0.5299]), ([0.0474, 0.9574], [0.0876, 0.5876])],
            [([0.0035, 0.9135], [0.2478, 0.7478]), ([0.0449, 0.9549], [0.2562, 0.7562])],
            [([0.5, 0.5], [0.5, 0.5]), ([0.3, 0.5], [0.3, 0.5])],
            [([0.15, 0.5], [0.03, 0.5]), ([0.18, 0.5], [0.06, 0.5])],
            [([0.1, 0.4], [0.2, 0.5]), ([0.2, 0.3], [0.3, 0.4])]
        ]
        return data

    def case12(self, numb=1000):
        """
        function: 随机生成数据
        :param numb: 数据个数
        :return:
        """
        max_numb = 1 / self.deviation
        if max_numb < numb:
            print('精度确定的数量小于需求量。')
            numb = max
        li_temp = []
        flag = True
        while flag:
            while True:
                a = rm.randint(0, max_numb)
                b = rm.randint(a, max_numb)
                c = rm.randint(0, max_numb)
                d = rm.randint(c, max_numb)
                if b + d <= max_numb:
                    break
            li_temp.append(([a / max_numb, b / max_numb], [b / max_numb, c / max_numb]))
            if len(li_temp) == numb:
                break
        return li_temp


if __name__ == "__main__":
    GetTestData().case11()
    # a = {1, 1, 1, 2}
    # print(list(a))
    # a.add(5)
    # print(list(a))
